<?php use_helper('yougoUrl') ?>

<div id="tab-bar">
    <ul>
        <?php if ($sf_user->isAuthenticated()): ?>
        <li <?php echo active_tab('requests', array('index', 'edit', 'update')) ? 'class="active"' : '' ?>><a href="<?php echo url_for('requests/index') ?>"><?php echo __('My requests') ?></a></li>
            <li <?php echo active_tab('requests', array('new', 'create')) ? 'class="active"' : '' ?>><a href="<?php echo url_for('requests/new') ?>"><?php echo __('New request') ?></a></li>
            <?php if ($sf_user->hasCredential('admin')): ?>
                <li <?php echo active_tab('requests', array('validation', 'validate')) ? 'class="active"' : '' ?>><a href="<?php echo url_for('requests/validation') ?>"><?php echo __('Validate requests') ?></a></li>
                <li <?php echo active_tab('users') ? 'class="active"' : '' ?>><a href="<?php echo url_for('users/index') ?>"><?php echo __('Manage users') ?></a></li>
                <li <?php echo active_tab('userTypes') ? 'class="active"' : '' ?>><a href="<?php echo url_for('userTypes/index') ?>"><?php echo __('Manage user types') ?></a></li>
                <li <?php echo active_tab('requestTypes') ? 'class="active"' : '' ?>><a href="<?php echo url_for('requestTypes/index') ?>"><?php echo __('Manage request types') ?></a></li>
            <?php endif ?>
        <?php endif ?>
    </ul>
</div>